package com.springboot.auth.authorization.service.impl;

import com.springboot.auth.authorization.entity.User;
import com.springboot.auth.authorization.provider.OrganizationProvider;
import com.springboot.auth.authorization.provider.WOAProvider;
import com.springboot.auth.authorization.service.IUserService;
import com.springboot.cloud.common.core.entity.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@Service
public class UserService implements IUserService {

    @Autowired
    private OrganizationProvider organizationProvider;

    @Autowired
    private WOAProvider woaProvider;

    @Override
    public User getByUniqueId(String uniqueId) {
        return organizationProvider.getUserByUniqueId(uniqueId).getData();
    }

    @Override
    public User getUserByOpenId(String openId) {
        return organizationProvider.getUserByOpenId(openId).getData();
    }

    @Override
    public String getSSceneStr(String openId) {
        return woaProvider.getSSceneStr(openId);
    }

}
